package com.lin.missyou.service;

import com.lin.missyou.model.Theme;
import com.lin.missyou.repository.ThemeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

/**
 * @author gcq
 * @Create 2021-10-25
 */
@Service
public class ThemeService {

    @Autowired
    ThemeRepository themeRepository;

    public List<Theme> findByNames(List<String> nameList) {
        return themeRepository.findByNames(nameList);
    }

    public Optional<Theme> findByName(String name) {
        return themeRepository.findByName(name);
    }
}